<% var pageLevelJS = { %>
<script type="text/javascript">
var settings = {
		 modelDomainFlag:"sys"
		,modelFlag:"config"
		,key:"${sessionId}"
		,addDivId:'add-dialog'
		,canDelete:false
	     ,canRemove:false
		,canUpdate:${shiro.hasPermission('sys_config:update:*')}
		,canAdd:${shiro.hasPermission('sys_config:add:*')}
		,canDetail:${shiro.hasPermission('sys_config:detail:*')}
		}
window.global.hasInstance = ${sysFlags.~size>1};
</script> 
<script type="text/javascript" src="${ctx}/static/js/sys/config/index.js"></script>
<%};%> 
<% var form = { %>
			<form id="searchForm" action="${ctx}/sys/config/query?_style=bs&${session._para}" class="form-inline" role="form">
				   <%if(has(sysFlags) && sysFlags.~size>1){ %>
					   <div class="form-group  ">
					     <label for="categoryCode">所属系统:</label>
						 <select placeholder="类别" name="instanceId" class="form-control">
						    <option value="">--系统--</option>
							<% for(res in sysFlags!){ %>
							  <option value="${res.id}">${res.nameStr}</option>
						　　   <% } %>
						</select>
					  </div>
				   <%}else{%>
				       <input type="hidden"  name="instanceId" value="${sys_flag}">
				    <% } %>
				  <div class="form-group  ">
				     <label for="email">名称:</label>
				        <input type="text"  class="validate[maxSize[50]] form-control" name="name" placeholder="名称/标识">
				  </div> 
			</form>
<%};%> 

<% var toolbar = { %>

<%if(shiro.hasPermission('config:add:*')) {%>
		<button type="button" class="btn btn-primary btn-xs addBtn" title="新增" data-toggle="modal" data-target="#myModal">
			<i class="ace-icon fa  fa-plus bigger-120"></i>新增 
		</button> 
		<%}%> 
	<div class="pull-right">
		 <button type="button" class="btn btn-info btn-xs tableBtn" title="控制非核心列">
		 <i class="ace-icon fa bigger-120">隐藏</i>
		</button>
	</div>
<%};%> 

<% var ths = { %>
       <th w_index="id" width="50px" w_class="center hidden-480" w_num="total_line" >序号</th>
       <th w_index="name" w_class="hidden-480" w_tip="true" >名称</th>
       <th w_index="label" w_tip="true">标识</th>
       <th w_index="val" w_tip="true" w_length="100">值</th>
       <%if(has(sysFlags) && sysFlags.~size>1){ %>
       <th w_index="instance.nameStr"  w_class="hidden-480">所属系统</th>
       <%}%>
       <th w_index="validCreateDt"  w_class="hidden-480" width="130px">创建时间</th>
       <th w_render="operateFunc" class="width-480-ctr" w_index="id" w="120px" width="120px">操作</th>
<%};%> 
<% var layoutParas =
{"title":"",table:"searchTable",tableClass:"","ths":ths,"toolbar":toolbar,"form":form,"pageLevelJS":pageLevelJS};
layout("/WEB-INF/views/btl/template/backBasicGridTemplate.html", layoutParas){ %>
	
<%} %>
